<!DOCTYPE html>
<html>
<head>
<title>人员管理</title>
<jsp:include page="../../include/header.jsp" />
</head>
<body class="smartao">
	<div class="breadcrumb">
		<span title="" data-original-title="" class="current"><i class="icon-cog icon-large"></i> 人员管理</span>
	</div>
	<div class="admin-detail-content">
		<div class="buttons">
			<a class="btn btn-success btn-small" href="base/employee/employee!preUpdate.action">新建人员</a>
		</div>
		<div class="searchs"></div>
		<table class="table table-striped">
			<thead>
				<tr>
					<th>编号</th>
					<th>姓名</th>
					<th>英文名</th>
					<th>性别</th>
					<th>账号状态</th>
					<th>办公地点</th>
					<th>所属部门</th>
					<th>直接上司</th>
					<th>主岗</th>
					<th>安全级别</th>
					<th>&nbsp;</th>
				</tr>
			</thead>
			<tbody>
			<c:forEach var="employee" items="${page.content}">
				<tr>
					<td>${employee.code}</td>
					<td><a href="base/employee/employee!preUpdate.action?id=${employee.id}">${employee.name}</a></td>
					<td>${employee.englishName}</td>
					<td>${employee.sex.description}</td>
					<td>
						<c:set var="accountStatusActive" value="<%=com.smartao.base.employee.AccountStatus.active%>" />
						<span class="label <c:if test="${employee.accountStatus eq accountStatusActive}">label-success</c:if>">
						${employee.accountStatus.description}
						</span>
					</td>
					<td>${employee.office}</td>
					<td>${employee.department.name}</td>
					<td>
						<c:if test="${employee.manager ne null}">${employee.manager.name}</c:if>
					</td>
					<td>
						<c:if test="${employee.position ne null}">${employee.position.name}</c:if>
					</td>
					<td>${employee.secLevel}</td>
					<td>
						<a class="btn btn-success btn-small" href="base/employee/employee!preUpdateAccount.action?id=${employee.id}">账号设置</a>
						<a class="btn btn-danger btn-small delete" employeeId="${employee.id}" href="javascript:;">删除</a>
					</td>
				</tr>
			</c:forEach>
			</tbody>
		</table>
		<jsp:include page="../../include/pagination.jsp" />
	</div>
	<div id="modalConfirmDeleteEmployee" class="modal hide fade" tabindex="-1" role="dialog" aria-labelledby="myModalLabel" aria-hidden="true">
		<div class="modal-header">
			<button type="button" class="close" data-dismiss="modal" aria-hidden="true">×</button>
			<h3 id="myModalLabel">对话框</h3>
		</div>
		<div class="modal-body">
			<p>确定删除该人员?</p>
		</div>
		<div class="modal-footer">
			<button class="btn btn-danger btn-small" id="btnConfirmDeleteEmployee" employeeId="">确定</button>
			<button class="btn btn-success btn-small" data-dismiss="modal" aria-hidden="true">取消</button>
		</div>
	</div>
	<script type="text/javascript">
		base.employee.init();
		initPagination(function(pageNo){
			toLocation('base/employee/employee.action?pageNumber='+pageNo);
		});
	</script>
</body>
</html>
<script>
	
</script>